﻿using System;

namespace Core.Entities.EQ
{
    /// <summary>
    /// 设备状态报警信息
    /// </summary>
    public class DevStatus : BaseEntity<string>
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        public override string? Id { get; set; }

        /// <summary>
        /// 设备编码
        /// </summary>
        public string? DevCode { get; set; }

        /// <summary>
        /// 设备名称
        /// </summary>
        public string? DevName { get; set; }

        /// <summary>
        /// 设备状态
        /// </summary>
        public string? DevStatusValue { get; set; }

        /// <summary>
        /// 设备报警信息
        /// </summary>
        public string? DevError { get; set; }

        /// <summary>
        /// 报警时间
        /// </summary>
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        public bool IsDeleted { get; set; }

        public DevStatus()
        {
            // 如果ID为空，自动生成GUID
            if (string.IsNullOrEmpty(Id))
            {
                Id = Guid.NewGuid().ToString();
            }
        }
    }
}